package editro.view.components 
{
	import com.greensock.TweenLite;
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author LEEF LEE_LEAF918@163.COM_QQ969442267
	 */
	public class ColorButton extends ColorShiningButton 
	{
		
		public function ColorButton() 
		{
			addEventListener(MouseEvent.MOUSE_OVER, shine);
			addEventListener(MouseEvent.MOUSE_OUT, dark);
		}
		
		public function  setColor(index:uint):void 
		{
			this.bg.gotoAndStop(index);
		}
		
		public function  setLable(label:String):void 
		{
			this.lab.text = label;
		}
		
		private function shine(e:MouseEvent):void 
		{
			TweenLite.to(this.light, 1, { alpha:1 } );
		}
		
		private function dark(e:MouseEvent):void 
		{
			TweenLite.to(this.light, 1, { alpha:0 } );
		}
		
	}

}